home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
tcekbd.arc
/
BIOSKEYE.DOC
< prev
next >
Wrap
Text File
|
1990-10-21
|
2KB
|
55 lines
BIOSKEYE
FUNCTION: Extended Keyboard interface, using BIOS services directly.
SYNTAX: #include <bioskeye.h>
int bioskeye(int cmd);
PROTOTYPE IN: bioskeye.h
REMARKS: BIOSKEYE performs various extended keyboard operations
using BIOS interrupt 0x16. The parameter 'cmd' determines
the exact operation. This function is identical to the
Turbo-C 'BIOSKEY' function except that is returns Extended
Keyboard keyboard values.
RETURN VALUE: The value returned by BIOSKEYE depends on the task it
performs, determined by thevalue of 'cmd':
0 - The upper 8 bits contain the bios scan code of the
key pressed. The lower 8 bits contain the ASCII value
of the key pressed if applicable.
1 - This tests whether a keystroke is available to be
read. A return value of zero means no key is available.
Otherwise, the value of the next keystroke is returned.
The keystroke itself is kept to be returned by the
next call to BIOSKEYE that has a 'cmd' value of zero.
2 - Requests the current shift key status. The value
returned is composed of the following bit settings
as defined by the current shift status:
Bit 15 - SysReq is depressed.
Bit 14 - Caps Lock is depressed.
Bit 13 - Num Lock is depressed.
Bit 12 - Scroll Lock is depressed.
Bit 11 - Right ALT key is pressed.
Bit 10 - Right CTRL key is pressed.
Bit 9 - Left ALT key is pressed.
Bit 8 - Left CTRL key is pressed.
Bit 7 - Insert is active.
Bit 6 - Caps Lock is active.
Bit 5 - Num Lock is active.
Bit 4 - Scroll Lock is active.
Bit 3 - ALT key is pressed.
Bit 2 - CTRL key is pressed.
Bit 1 - Left Shift is pressed
Bit 0 - Right Shift is pressed
PORTABILITY: BIOSKEYE only works with IBM PCs and compatibles with
Extended or Enhanced Keyboards.
EXAMPLE: See DEMO.C for an example on BIOSKEYE usage.